<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@include file="../common/user_header.jsp"%>
<body>

	<div class="tm_main">
    	
		 
        <div class="tm_container">
        	<div class="tm_navtitle">
				<h1>学习中心</h1>
            </div>
        </div>
        
        <div class="tm_container">
			<form action="fileStudy" method="get">
			<div class="tm_searchbox">
				标题 :
				<input type="text" name="title" class="tm_txts" size="10" maxlength="20" value="${title}" /> &nbsp;
				<button class="tm_btns" type="submit">搜索</button>
			</div>

				<!-- 当前日期 -->

        	<table width="100%" cellpadding="10" border="0" class="tm_table_list">
            	<thead>
                	<tr>
                        <th>编号</th>
                    	<th>标题</th>
						<th>上传人</th>
						<th>上传时间</th>
						<th>关联考试</th>
						<th>最低学习时间</th>
						<th>已学习时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
					<c:if test="${empty fileList}">
						<tr>
							<td colspan="7">暂无学习!</td>
						</tr>
					</c:if>
					<c:forEach items="${fileList }" var = "file">
						<tr id="tr-${file.id }" data-key="${file.id }">
								<td >${file.id }</td>
								<td >${file.title }</td>
								<td >${file.username }</td>
								<td ><fmt:formatDate value="${file.inputTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td >${file.examName }</td>
								<td >${file.playMinTime }</td>
								<td >${file.playTime }</td>
								<td >
									<a href="study?id=${file.id }&src=${file.url}" target="_blank" class="tm_btn tm_btn_primary" style="text-decoration:none;color:white;" >学习</a>
								</td>
						</tr>
					</c:forEach>
                </tbody>
            </table>
			</form>
			<table width="100%" cellpadding="10" border="0" class="tm_table_list">
				<tfoot>
					<tr>
						<td>
							<div class="tm_pager_foot">
								<a href="file?page=${page - 1}" class="tm_btns" style="color:white;text-decoration:none;">上一页</a>&nbsp;&nbsp;&nbsp;<font size="5" color="red"><b>${page}</b></font>&nbsp;&nbsp;&nbsp;<a href="file?page=${page + 1}" class="tm_btns" style="color:white;text-decoration:none;">下一页</a>&nbsp;
							</div>
						</td>
					</tr>
				</tfoot>
			</table>
        </div>
        
        
    </div>
<script type="text/javascript">
		window.onload = function(){
			$(".tm_table_list tbody tr").mouseover(function(){
				$(this).attr("style","background:#f5f5f5");
			});
			$(".tm_table_list tbody tr").mouseout(function(){
				$(this).attr("style","background:#ffffff");
			});
		}
	</script>
</body>
</html>